<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.7.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				$("button:eq(0)").click(function() {
					$("img").animate({
						"width": "50px",
						"left": "0px"
					}, 0, function() {
						$("img").css("transform", "rotateY(0deg)")
					})
					.animate({
						"width": "200px",
						"left": "300px"
					}, 2000, function() {
						$("img").css("transform", "rotateY(180deg)")
					})
					.animate({
						"width": "50px",
						"left": "0px"
					}, 2000, function() {
						$("img").css("transform", "rotateY(0deg)")
					})
					
				})
				$("button:eq(1)").click(function(){
					$("img").stop(true)
				})
			})
		</script>
	</head>
	<body>
		<button type="button">开始动画</button>
		<button type="button">停止动画</button>
		<br>
		<img src="img/fish.png" width="50" style="position: absolute;">
	</body>
</html>
